<template>
  <div id="app">
    <nav>
      <router-link to="/discover">发现音乐</router-link> |
      <router-link to="/collect">我的收藏</router-link> |
      <router-link to="/personal">个人中心</router-link> |
      <router-link to="/list">商品列表</router-link>
      <button @click="jump">朴实无华的按钮</button>
    </nav>
    <router-view />
  </div>
</template>
<script>
export default {
  methods: {
    jump() {
      // this.$router.push("/collect");
      // this.$router.push({ path: "/mine" });
      // 传递query参数
      // this.$router.push({ path: "/collect", query: { name: "李雷" } });
      this.$router.push({ name: "discover", params: { name: "asd" } });
    },
  },
};
</script>
